Subject: Get1IndString Author: Gregory Jorgensen Uploaded By: RadixInc Date: 8/9/1995 File: Get1IndString.sit (2134 bytes) Estimated Download Time (60658 baud): < 1 minute Download Count: 156 Needs: C++ compiler Keywords: GETINDSTRING STRING LIST RESOURCE LIBRARY: MDV/Developer Source Code/C++ KEYWORDS: GETINDSTRING STRING LIST RESOURCE Get1IndString is a function that should be in the Toolbox but isn't. It is a one-deep version of GetIndString. It returns a specific string from a STR# resource, but only looks in the current (top) resource file for the resource. The Toolbox GetIndString function will search the entire resource chain, which is sometimes what you want, but sometimes not. This is source code for four functions; there are no patches of any kind involved. Programmers interested in the mysteries of STR# resources, C and Pascal strings, and overly-clever "for" loops should have a look. This file contains four functions: Get1IndString: 1-deep version of the Toolbox GetIndString function get1indstring: C-string version of Get1IndString CountStrings: count number of strings in an STR# resource Count1Strings: 1-deep version of CountStrings You will need a C++ compiler to compile the code, but the functions can be called from either C or C++. Copyright 1995 Gregory W. Jorgensen, All Rights Reserved May be used and distributed free of charge, but copyright notice in source code must be left intact. ------------------------------------------------------------ Macintosh Developers Forum Libraries Go Keyword: MDV This file has been checked for viruses with Disinfectant 3.6